.TH ATM 1
.SH NAME
atm \- a simple authentication token manager
.SH DESRIPTION
.B atm
is a simple authentication token manager that encrypts passwords and
other tokens with the user's gpg key, stores them in a directory tree
and allows the retrieval of tokens to either stdout or X selection. If
no value is provided for the token, the manager will create a random
value. The manager is operated via an interactive interface.
.SH COMMANDS
.TP
.B add \fR[\fIgid/\fR]\fItoken\fR [\fIvalue\fR]
Add a token to group \fIgid\fR with name \fItoken\fR: this creates a
file \fItoken\fR in a directory \fIgid\fR. If no \fIvalue\fR is
supplied, the manager will create a 24 character random value using
\fI/dev/urandom\fR (the character set of the token is by
default 'A-Za-z0-9!"#$%&()*+-/:;<=>?@[]^_{}').

The value is encrypted with \fBgpg\fR(1), using the user's key, and
stored in the file \fItoken\fR.

Updating the value of a token is done by overwriting the token with
\fBadd\fR. The manager will prompt if anything is about to be
overwritten.

.TP
.B del \fIgid\fR[\fI/\fR]\fI|token\fR
Delete \fItoken\fR from group \fIgid\fR. If no token is provided the
group and all contained tokens are deleted. The manager will prompt
before anything is deleted.
.TP
.B mvt \fIgid1\fR[\fI/\fR]\fI|token1\fR \fIgid2\fR[\fI/\fR]\fI|token2\fR
Move group \fIgid1\fR and all contained tokens to \fIgid2\fR, or a
single token to another group or token. The manager will prompt if
anything is about to be overwritten.
.TP
.B ins \fR[\fIgid/\fR]\fItoken\fR
Set the value of \fItoken\fR to the X selection.
.TP
.B prt \fR[\fIgid/\fR]\fItoken\fR
Print the value of \fItoken\fR to stdout. The manager will prompt before
printing the value.
.TP
.B ls \fR[\fI-d\fR] [\fIgid\fR]
Print the directory tree of group \fIgid\fR. If \fI-d\fR is set, print
only groups. Without arguments, print the whole tree.
.TP
.B q
Quit the program.
.TP
.B ?
Print the following line:

Syntax: add|del|mvt|ins|prt|ls|q|? [gid/token [value]]
.SH ENVIRONMENT
It is important to set the environment variable GPG_TTY=$(tty) in your
login shell. See \fBgpg-agent\fR(1) for details.
.SH FILES
.B atm
uses $HOME/.atm for it's files.
.SH TIPS
Since the first letters of the commands differ from each other, a
shorter syntax is also supported. One can thus, e.g., write d instead of
del.
.SH EXAMPLES
.TP
.B Create a random value token called root to a group called system:
add system/root
.TP
.B Print its value to stdout:
prt system/root
.TP
.B Change the value to 1234:
add system/root 1234
.TP
.B Set the value to the X selection (paste with, e.g., shift-insert):
ins system/root
.TP
.B Add a token called user to the group system:
add system/user
.TP
.B Rename the token user to luser and move it to a group called remote/system:
mvt system/user remote/system/luser
.TP
.B Delete the group system and all contained tokens:
del system
.SH AUTHOR
mlaine@sdfeu.org, October 2016
.SH "SEE ALSO"
.BR gpg (1),
.BR gpg-agent (1),
.BR xsel (1x)

